import { useState } from 'react';

const useLoading = (value: boolean) => {
  const [loading, updateLoading] = useState(value);
  const setLoading = (value: boolean) => {
    updateLoading(value);
  };
  return {
    loading,
    setLoading,
  };
};

export default useLoading;
